package com.baijiayun.live.ui.pptpanel.popupwindow

import android.content.Context
import androidx.core.content.ContextCompat
import com.baijiayun.live.ui.R
import com.baijiayun.live.ui.base.RouterViewModel
import com.baijiayun.liveuibase.utils.DisplayUtils
import com.baijiayun.liveuibase.widgets.popupwindow.BaseAutoArrangePopupWindow
import com.baijiayun.liveuibase.widgets.toolbar.BaseDrawTextSettingWindow
import com.baijiayun.liveuibase.widgets.toolbar.ColorSelectData

class DrawWordPopupWindow(context: Context, private val routerViewModel: RouterViewModel)
    : BaseDrawTextSettingWindow(context) {

    init {
        if (DisplayUtils.isPad(context)) {
            setDirectionMode(BaseAutoArrangePopupWindow.HORIZONTAL)
        }
    }

    override fun onChangeColor(colorSelectData: ColorSelectData?) {
        routerViewModel.drawColorChange.value = colorSelectData
    }

    override fun onChangeTextSize(textSize: Int) {
        routerViewModel.drawTextSizeChange.value = textSize
    }
}